Implement telegram integration for task creation and event extraction, plus saving to db#16
Conversation
…, plus saving to db
Review Summary by QodoImplement Telegram bot integration with event extraction and database persistence
WalkthroughsDescription• Add Telegram bot integration for task creation from messages • Create TaskInput database model to store extracted events • Implement task_input_service for persisting data to database • Add automatic database table creation on application startup Diagramflowchart LR
User["User sends message<br/>via Telegram"]
Bot["Telegram Bot<br/>Message Handler"]
Extractor["Event Extractor<br/>Service"]
DB["TaskInput<br/>Database Model"]
Response["Send Event Draft<br/>to User"]
User -->|"message_text"| Bot
Bot -->|"extract_event_from_text"| Extractor
Extractor -->|"extracted_event"| Bot
Bot -->|"save_task_input"| DB
DB -->|"persisted"| Bot
Bot -->|"formatted response"| Response
File Changes1. app/main.py
|
Code Review by Qodo
1. Missing Telegram dependency
|
| from dotenv import load_dotenv | ||
| from telegram import Update | ||
| from telegram.ext import ApplicationBuilder, CommandHandler, MessageHandler, ContextTypes, filters |
There was a problem hiding this comment.
1. Missing telegram dependency 🐞 Bug ≡ Correctness
app/services/telegram_bot.py imports the telegram package, but the project dependency list does not include python-telegram-bot, so importing/running the bot will fail with ModuleNotFoundError. This blocks the Telegram integration from working at all.
Agent Prompt
## Issue description
`app/services/telegram_bot.py` imports `telegram` / `telegram.ext`, but the repository does not declare a dependency that provides those modules. This will crash at import-time with `ModuleNotFoundError: No module named 'telegram'`.
## Issue Context
- The Telegram bot implementation lives in `app/services/telegram_bot.py`.
- Dependencies are declared in `pyproject.toml`; lockfile should be updated accordingly.
## Fix
1. Add `python-telegram-bot` to `[project].dependencies` in `pyproject.toml`.
2. Re-lock dependencies (e.g., `uv add python-telegram-bot` or equivalent) so `uv.lock` is updated.
## Fix Focus Areas
- pyproject.toml[1-13]
- app/services/telegram_bot.py[1-13]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.